import request from '@/utils/request'
export function orgConfList(params) {
  return request({
    url: `/kd_manage/orgConf/list`,
    method: 'get',
    params
  })
}
export function merchantConfList(params) {
  return request({
    url: `/kd_manage/merchantConf/list`,
    method: 'get',
    params
  })
}
export function flowAlertList(params) {
  return request({
    url: `/kd_manage/flowAlert/list`,
    method: 'get',
    params
  })
}
export function tenantFlowAuditList(data) {
  return request({
    url: `/kd_manage/tenantFlowAudit/list`,
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: `/kd_manage/orgConf/update`,
    method: 'post',
    data
  })
}
export function insert(data) {
  return request({
    url: `/kd_manage/orgConf/insert`,
    method: 'post',
    data
  })
}
export function merchantConfUpdate(data) {
  return request({
    url: `/kd_manage/merchantConf/update`,
    method: 'post',
    data
  })
}
export function flowUpAgt(data) {
  return request({
    url: `/kd_manage/flowAlert/update/agentAlert`,
    method: 'post',
    data
  })
}
export function flowUpMerc(data) {
  return request({
    url: `/kd_manage/flowAlert/update/merchantAlert`,
    method: 'post',
    data
  })
}
export function tenantFlowAudit(data) {
  return request({
    url: `/kd_manage/tenantFlowAudit/audit`,
    method: 'post',
    data
  })
}
// 获取租户采购审核列表
export const tenantFlowAuditExport = data => {
  return request({
    url: '/kd_manage/tenantFlowAudit/export',
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 获取未配置代理流量的机构列表
export function orgDeptList() {
  return request({
    url: `kd_manage/orgConf/orgDeptList`,
    method: 'get'
  })
}

// 获取未配置商户流量的机构列表 GET方式
export function mrcDeptList() {
  return request({
    url: `kd_manage/merchantConf/mrcDeptList`,
    method: 'get'
  })
}

// 新增机商户套餐配置 POST方式
export function merchantConfInsert(data) {
  return request({
    url: `kd_manage/merchantConf/insert `,
    method: 'post',
    data
  })
}
